package com.wanxi.extend;

public class Worker extends People  {
    private String name;
    private Integer age;

    public Worker() {
        System.out.println("worker无参数的构造方法");
    }

    public Object work(String name) {
        return "";
    }

    public Worker(String name, Integer age) {
        System.out.println("worker有参数的构造方法");
        this.name = name;
        this.age = age;
    }

    public String getName() {

        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
